package jp.co.toshiba.ffsa.form.cses;

import jp.co.toshiba.ffsa.form.BaseForm;

import org.seasar.struts.annotation.Arg;
import org.seasar.struts.annotation.Mask;
import org.seasar.struts.annotation.Maxlength;
import org.seasar.struts.annotation.Msg;
import org.seasar.struts.annotation.Required;

/**
 * 簡易(最小入力)フォーム
 * @author npc
 */
public class Cses101Form extends BaseForm {
    /** FPGAメーカー名 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="fpga_maker", resource=true))
    public String fpgaMaker;

    /** FPGAシリーズ名 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="fpga_series", resource=true))
    public String fpgaSeries;

    /** FPGA型名 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="fpga_model", resource=true))
    public String fpgaModel;

    /** パッケージ */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="pkg_type", resource=true))
    public String pkgTypeS;

    /** 数量 */
    @Required(msg=@Msg(key="errors.required", resource=true), arg0=@Arg(key="quantity", resource=true))
    public String quantityS;

    /** 用途 */
    @Maxlength(maxlength=200, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="use_for", resource=true), arg1=@Arg(key="200", resource=false))
    @Mask(mask="^[0-9a-zA-Z \r\n]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="use_for", resource=true))
    public String useForS;

    /** 開発スケジュール */
    @Maxlength(maxlength=200, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="development_schedule", resource=true), arg1=@Arg(key="200", resource=false))
    @Mask(mask="^[0-9a-zA-Z \r\n]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="development_schedule", resource=true))
    public String developmentScheduleS;

    /** ターゲット開発費 */
    @Maxlength(maxlength=10, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="target_nre", resource=true), arg1=@Arg(key="10", resource=false))
    @Mask(mask="^[0-9]+$", msg=@Msg(key="errors.numeric", resource=true), arg0=@Arg(key="target_nre", resource=true))
    public String targetNreS;

    /** ターゲット単価 */
    @Maxlength(maxlength=10, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="target_price", resource=true), arg1=@Arg(key="10", resource=false))
    @Mask(mask="^[0-9]+$", msg=@Msg(key="errors.numeric", resource=true), arg0=@Arg(key="target_price", resource=true))
    public String targetPriceS;

    /** 要求IP情報 */
    @Maxlength(maxlength=200, msg=@Msg(key="errors.maxlength", resource=true), arg0=@Arg(key="ip", resource=true), arg1=@Arg(key="200", resource=false))
    @Mask(mask="^[0-9a-zA-Z \r\n]+$", msg=@Msg(key="errors.emcharacter", resource=true), arg0=@Arg(key="ip", resource=true))
    public String ipS;

    /**
     * 初期化処理
     */
    public void reset(){
        this.fpgaMaker            = "";
        this.fpgaSeries           = "";
        this.fpgaModel            = "";
        this.pkgTypeS             = "";
        this.quantityS            = "";
        this.useForS              = "";
        this.developmentScheduleS = "";
        this.targetNreS           = "";
        this.targetPriceS         = "";
        this.ipS                  = "";
    }
}